package nio2;

import java.io.IOException;
import java.nio.channels.AsynchronousChannelGroup;
import java.nio.channels.AsynchronousServerSocketChannel;
import java.nio.channels.AsynchronousSocketChannel;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class AsyncChannel {
    public static void main(String[] args) throws IOException {
        AsynchronousChannelGroup group = AsynchronousChannelGroup.withCachedThreadPool(Executors.newCachedThreadPool(), 10);
        AsynchronousServerSocketChannel server =
                AsynchronousServerSocketChannel.open().bind(null);
        Future<AsynchronousSocketChannel> acceptFuture = server.accept();
    }
}